package Var1022.Petsystem;

//父类
public class Pet {
    private String name;//名字
    private String varieties;//品种
    private int weight;//体重
    private String eat;//吃的
    private String sui;//睡

    //吃
    public void eat() {
        System.out.println(name + "吃的是:" + eat);
    }

    //睡
    public void sleep() {
        System.out.println(name + "睡在:" + sui);
    }

    public void show() {
        System.out.println("名字叫:" + name + ",体重是:" + weight + ",品种是:" + varieties);
    }

    public Pet(String name, String varieties, int weight, String eat, String sui) {
        this.name = name;
        this.varieties = varieties;
        this.weight = weight;
        this.eat = eat;
        this.sui = sui;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getVarieties() {
        return varieties;
    }

    public void setVarieties(String varieties) {
        this.varieties = varieties;
    }

    public int getWeight() {
        return weight;
    }

    public void setWeight(int weight) {
        this.weight = weight;
    }

    public String getEat() {
        return eat;
    }

    public void setEat(String eat) {
        this.eat = eat;
    }

    public String getSui() {
        return sui;
    }

    public void setSui(String sui) {
        this.sui = sui;
    }
}
